<?php
namespace app\admin\validate;
use think\Validate;
class Other extends Validate
{
    //验证规则
    protected $rule = [
        'title'       =>  'require|max:1000',
        'keywords'    =>  'require|max:1000',
        'desc'        =>  'require|max:1000',
    ];
    //错误提示
    protected $message = [
        'title.require'     => '标题必须填写',
        'title.max'         => '标题长度不能大于1000位',
        'keywords.require'  => '关键字必须填写',
        'keywords.max'      => '关键字长度不能大于1000位',
        'desc.require'      => '描述必须填写',
        'desc.max'          => '描述长度不能大于1000位',
    ];
    //验证场景
    protected  $scene = [
        'add'  => [],
        'edit' => [],
    ];
}
